import { defineStore } from 'pinia';
import { api as Request } from '@/utils/api'

export const useMenuStore = defineStore('menu', {
  state: () => {
    return {
      menuList: [],
      permissionInfo: ''
    };
  },
  actions: {
    /* 获取菜单权限信息 */
    getMyRoleInfo (data) {
      return Request.getMyRoleInfo(data);
    },
    /* 设置菜单信息 */
    setMenuListInfo (data) {
      this.menuList = data;
    },

    /* 设置权限信息 */
    setPermissionInfo (data) {
      this.permissionInfo = data;
    }
  }
});
